gnss20 2.2.0
Loading...
Searching...
No Matches
gnss20


GNSS 20 Click

GNSS 20 Click demo application is developed using the NECTO Studio, ensuring compatibility with mikroSDK's open-source libraries and tools. Designed for plug-and-play implementation and testing, the demo is fully compatible with all development, starter, and mikromedia boards featuring a mikroBUS™ socket.


Click Library

  • Author : Stefan Filipovic
  • Date : Jul 2025.
  • Type : UART/I2C/SPI type

Software Support

Example Description

This example demonstrates the use of GNSS 20 Click by reading and displaying the GNSS coordinates.

Example Libraries

  • MikroSDK.Board
  • MikroSDK.Log
  • Click.GNSS20

Example Key Functions

  • gnss20_cfg_setup This function initializes Click configuration structure to initial values.
    void gnss20_cfg_setup(gnss20_cfg_t *cfg)
    GNSS 20 configuration object setup function.
    GNSS 20 Click configuration object.
    Definition gnss20.h:243
  • gnss20_init This function initializes all necessary pins and peripherals used for this Click board.
    err_t gnss20_init ( gnss20_t *ctx, gnss20_cfg_t *cfg );
    struct gnss20_s gnss20_t
    GNSS 20 Click context object.
    err_t gnss20_init(gnss20_t *ctx, gnss20_cfg_t *cfg)
    GNSS 20 initialization function.
  • gnss20_generic_read This function reads a desired number of data bytes by using the selected serial interface.
    err_t gnss20_generic_read ( gnss20_t *ctx, uint8_t *data_out, uint16_t len );
    err_t gnss20_generic_read(gnss20_t *ctx, uint8_t *data_out, uint16_t len)
    GNSS 20 data reading function.
  • gnss20_parse_gga This function parses the GGA data from the read response buffer.
    err_t gnss20_parse_gga ( uint8_t *rsp_buf, uint8_t gga_element, uint8_t *element_data );
    err_t gnss20_parse_gga(uint8_t *rsp_buf, uint8_t gga_element, uint8_t *element_data)
    GNSS 20 parse GGA function.
  • gnss20_get_pps_pin This function returns the pulse per second (PPS) pin logic state.
    uint8_t gnss20_get_pps_pin ( gnss20_t *ctx );
    uint8_t gnss20_get_pps_pin(gnss20_t *ctx)
    GNSS 20 get PPS pin function.

Application Init

Initializes the driver and logger.

void application_init ( void )
{
log_cfg_t log_cfg;
gnss20_cfg_t gnss20_cfg;
LOG_MAP_USB_UART( log_cfg );
log_init( &logger, &log_cfg );
log_info( &logger, " Application Init " );
// Click initialization.
gnss20_cfg_setup( &gnss20_cfg );
GNSS20_MAP_MIKROBUS( gnss20_cfg, MIKROBUS_1 );
if ( UART_ERROR == gnss20_init( &gnss20, &gnss20_cfg ) )
{
log_error( &logger, " Communication init." );
for ( ; ; );
}
log_info( &logger, " Application Task " );
}
#define GNSS20_MAP_MIKROBUS(cfg, mikrobus)
MikroBUS pin mapping.
Definition gnss20.h:178
void application_init(void)
Definition main.c:78

Application Task

Reads the received data, parses the NMEA GGA info from it, and once it receives the position fix it will start displaying the coordinates on the USB UART.

void application_task ( void )
{
if ( GNSS20_OK == gnss20_process( &gnss20 ) )
{
gnss20_parser_application( app_buf );
}
}
@ GNSS20_OK
Definition gnss20.h:278
void application_task(void)
Definition main.c:108

Application Output

This Click board can be interfaced and monitored in two ways:

  • Application Output - Use the "Application Output" window in Debug mode for real-time data monitoring. Set it up properly by following this tutorial.
  • UART Terminal - Monitor data via the UART Terminal using a USB to UART converter. For detailed instructions, check out this tutorial.

Additional Notes and Information

The complete application code and a ready-to-use project are available through the NECTO Studio Package Manager for direct installation in the NECTO Studio. The application code can also be found on the MIKROE GitHub account.